<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../../css/mypetstore.css" type="text/css" media="screen"/>
</head>
<body>
<div th:replace="jsp/common/top">
</div>
<div id = "Content">
<div id = "Catalog" th:each="vo:${VOList}">
    <h3>--------------------order--------------------</h3>
    <table>
      <tr>
        <th><b>OrderId</b></th>
        <th><b>OrderDate</b></th>
        <th><b>ShipToAddress</b></th>
        <th><b>ShipToFirstName</b></th>
        <th><b>ShipToLastName</b></th>
        <th><b>TotalPrice</b></th>
      </tr>
      <tr>
        <td th:text="${vo.order.orderId}">orderId</td>
        <td th:text="${vo.order.orderDate}">orderDate</td>
        <td th:text="${vo.order.shipAddress1}">shipAddress1</td>
        <td th:text="${vo.order.shipToFirstName}">shipToFirstName</td>
        <td th:text="${vo.order.shipToLastName}">shipToLastName</td>
        <td th:text="${vo.order.totalPrice}">totalPrice</td>
      </tr>

      <tr>
        <th><b>Num</b></th>
        <th><b>Item ID</b></th>
        <th><b>Description</b></th>
        <th><b>Quantity</b></th>
        <th><b>List Price</b></th>
        <th><b>Total Cost</b></th>
      </tr>
      <tr th:each="lineItemVo:${vo.lineItemVOs}">
        <td th:text="${lineItemVo.lineItem.lineNumber}">lineNumber</td>
        <td>
          <a th:href="@{/catalog/viewItem(itemId=${lineItemVo.lineItem.itemId})}" th:text="${lineItemVo.lineItem.itemId}">go to item product</a>
        </td>
        <td>
          <span th:if="${lineItemVo.item.attr1 != null}" th:text="${lineItemVo.item.attr1}"></span>
          <span th:if="${lineItemVo.item.attr2 != null}" th:text="${lineItemVo.item.attr2}"></span>
          <span th:if="${lineItemVo.item.attr3 != null}" th:text="${lineItemVo.item.attr3}"></span>
          <span th:if="${lineItemVo.item.attr4 != null}" th:text="${lineItemVo.item.attr4}"></span>
          <span th:if="${lineItemVo.item.attr5 != null}" th:text="${lineItemVo.item.attr5}"></span>
          <span th:text="${lineItemVo.productName}"></span>
        </td>
        <td th:text="${lineItemVo.lineItem.quantity}">quantity</td>
        <td th:text="${lineItemVo.lineItem.unitPrice}">unitPrice</td>
        <td th:text="${lineItemVo.lineItem.unitPrice * lineItemVo.lineItem.quantity}">total</td>
      </tr>
    </table>

</div>
</div>
<div th:replace="jsp/common/bottom">
</div>
</body>
</html>